package main

import (
	"github.com/gin-gonic/gin"
	"test/controller"
	"test/middleware"
)

func CollectRoute(r *gin.Engine) *gin.Engine{
	r.POST("/api/auth/register", controller.Register)
	r.POST("/api/auth/login", controller.Login)
	r.GET("/api/auth/info", middleware.UserMiddleware(), controller.Info)//中间建认证，保护路由
	return r
}
